for i in range(5):
    print(i)
print('结束')
for i in range(1,5):
    print(i)

# range(stop)：从0开始，到stop-1结束
#
# range(start, stop)：从start开始，到stop-1结束
#
# range(start, stop, step)：从start开始，到stop-1结束，步长为step
print('结束')
for i in range(1,5,2):
    print(i)

print('结束')
for j in range(3,20,23):
    print(j)


print('结束')
a = ['Mary', 'had', 'a', 'little', 'lamb']
for i in range(len(a)):
    print(i, a[i])